﻿using System;
using System.Globalization;
using System.Windows.Data;
using System.Windows.Media;

namespace MyFloridaHouse.libSvCommonUtilities.Converters
{
    //[ValueConversion(typeof(Brush), typeof(int))]
    public class ConvertLoadingBrushFromInt : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            Brush newBrush;
            int myInt = (int)value;
            if (myInt > 0)
            {
                newBrush = new SolidColorBrush(Colors.Yellow);
            }
            else
            {
                newBrush = new SolidColorBrush(Colors.Transparent);
            }
            return newBrush;

        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {

            throw new NotImplementedException();
        }
    }
}
